1. Technical Field
The present invention relates to an image processor that detects targets such as a human and a pet from an image, an image processing method, a control program, and a recording medium.
2. Related Art
In recent years a technology in which, during photographing, a human face and the like are detected to focus a digital camera on a detected target or to adjust a white balance of the detected target is mounted on image processors such as the digital camera. In the technology, it is desired that targets such as the human face can correctly be detected from the image. Therefore, various technologies of detecting a predetermined target have been developed.
For example, in a technology disclosed in Japanese Unexamined Patent Publication No. 2011-124819, a face pattern having a high matching degree with a registration pet image is extracted by referring to dictionary data, and processing of recognizing the registration pet image is performed based on the extracted face pattern.
In a technology disclosed in Japanese Unexamined Patent Publication No. 2010-277242, in order to accurately detect a front face at a high speed, a first-stage classifier is performed to detect a face image, and a second-stage classifier is performed to a position where the face image is detected and a neighborhood of the position to detect the front face.
In a technology disclosed in Japanese Unexamined Patent Publication No. 2010-238181, face images of a registrant viewed from various directions are registered, and the registrant is authenticated based on the registered data.
In a technology disclosed in Japanese Unexamined Patent Publication No. 2010-96962, a user sets an AF frame, and a range of the AF frame is changed so as to fit in the position and size of the face image included in the AF frame.
It is assumed here that the image processor performs face detection processing of detecting a “face” from an image using a face detector that detects a common human face, a pet face and the like. In many cases, the face detector can detect the human face and the pet face, which are included in the photographed image. However, sometimes the face detector cannot detect some of the human faces and the pet faces. In this case, with the conventional image processor, the user is caused to register the image including the target that cannot be detected by the face detector, and the desired target is detected based on the registration image, thereby solving the problem.
Thus, the target that cannot be detected by the face detector can be detected by performing the detection processing based on the registration image. Here, in order to detect the desired target based on the registration image, it is necessary that the whole desired target be included in the registration image. However, when registering the image, sometimes the user cannot assign a domain including the whole desired target.
For example, in the case where the desired target is a dog or a cat, sometimes the domain including the whole face of the dog or the cat cannot be assigned because the domain (a boundary) of the “face” is unclear compared with the human face. Even if the user exactly understands the domain including the target, the user mistakenly assigns another domain, and sometimes the whole desired target is not included in the assigned domain.
On the other hand, in order to cause the user to assign the domain including the whole desired target, it is conceivable that the number of input points used to specify the domain is increased (for example, the assignment of the positions of organs such as an eye, a nose, and a mouth). However, in the method, the user manipulation is complicated and degrades operability.
Therefore, similarly to the conventional method, the domain is desirably assigned based on the one or two input points to generate the registration image.
The present invention has been devised to solve the problems described above, and an object thereof is to construct an image processor that can easily register the registration image including the desired target, an image processing method, a control program, and a recording medium.